//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//------------------------------------------------------------------------------
//
//  File:  bsp_oaldisp.h
//
//  This file contains specification LCD display in oal and mini terminal functions
//
#ifndef __BSP_OALDISP_H__
#define __BSP_OALDISP_H__

#ifdef __cplusplus
extern "C" {
#endif


//------------------------------------------------------------------------------
// LCD mini Terminal Functions
//
BOOL OEMLCDInit(BOOL fClear);
VOID OEMLCDDeinit(VOID);

VOID LCDWriteByte(char ch);
VOID LCDWriteString(UINT16 *string);
VOID LCDStatusPrintf(LPCWSTR format, ...);
VOID LCDTermPrintf(LPCWSTR format, ...);
VOID LCDTermvPrintf(LPCWSTR format, va_list pArgList);
VOID LCDTermFillRect(WORD wX, WORD wY, INT nWidth, INT nHeight, WORD wColor);
WORD SetBackColor(WORD bkColor);
WORD SetForeColor(WORD foreColor);
BOOL SetCursorXY(WORD wX, WORD wY);
VOID GetCursorXY(WORD *pwX, WORD *pwY);
WORD SetCharAttributes(WORD wAttr);
WORD GetCharAttributes(void);
void LCDBitblt(void * bmp,WORD height);
BOOL LCDTermShowSplash(unsigned char *pBitmap);
#define DISP_ATTR_NORMAL                0x0000
#define DISP_ATTR_INVERT                0x0001
#define DISP_ATTR_TRANSPARENT           0x0002

//------------------------------------------------------------------------------
// courier font

#define FIRSTCHAR                       0x1e
#define LASTCHAR                        0x7f
#define DEFAULTCHAR                     0x20
#define PIXWIDTH                        0x8
#define PIXHEIGHT                       0xe

#define CX_SCREEN                       240
#define CY_SCREEN                       320
#define SCR_STRIDE                      (CX_SCREEN * 2)

#define CY_STATUS                       26
#define CY_STATUS_HEIGHT                (CY_SCREEN - ((CY_SCREEN - CY_STATUS) / PIXHEIGHT) * PIXHEIGHT)

#define TERM_WIDTH                      (CX_SCREEN / PIXWIDTH)
#define TERM_HEIGHT                     ((CY_SCREEN - CY_STATUS) / PIXHEIGHT)

#define LCDTERM_STATUS_LOC              (TERM_HEIGHT - 3)

//------------------------------------------------------------------------------
//	Chiffchaff BSP define
#define IPL_VERSION_LOC_X               0
#define IPL_VERSION_LOC_Y               16

#define BSP_VERSION_LOC_X               IPL_VERSION_LOC_X
#define BSP_VERSION_LOC_Y               (IPL_VERSION_LOC_Y + 1)


#ifdef __cplusplus
}
#endif

#endif // __BSP_OALDISP_H__

